using System;
using System.Data;
using System.Text;

using Wicresoft.Common;
using Wicresoft.Busi.Entity;

namespace Wicresoft.Busi.BizLogic
{
    /// <summary>
    /// Summary description for BLMeetingRoomDevice.
    /// </summary>
    public class BLMeetingRoomDevice
    {
        public BLMeetingRoomDevice()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public static bool DelMeetingRoomDevice(int RoomID)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(MeetingRoomDevice.SQLCOL_ROOMID + " = " + RoomID);
            return DataAccess.Delete(typeof(MeetingRoomDevice), sb.ToString());
        }

        public static DataTable GetMeetingRoomDevice(int RoomID)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(MeetingRoomDevice.SQLCOL_ROOMID + " = " + RoomID);

            return DataAccess.Select(typeof(MeetingRoomDevice), sb.ToString(), MeetingRoomDevice.SQLCOL_ID);
        }

        public static DataTable GetMeetingRoomDevice(int RoomID, PagingEntity pe)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(MeetingRoomDevice.SQLCOL_ROOMID + " = " + RoomID);

            pe.WhereClause = sb.ToString();
            return DataAccess.Select(pe, "Busi.ConnectionString");
        }
    }
}
